package mviewer.types;

import java.util.Iterator;

public class SegregatedDataIterator<T> implements Iterator<T> {

	private String name;
	private Iterator<? extends T> delegate;

	public SegregatedDataIterator(String name, Iterator<? extends T> iterator) {
		this.name = name;
		delegate = iterator;
	}

	public boolean hasNext() {
		return delegate.hasNext();
	}

	public T next() {
		return delegate.next();
	}

	public void remove() {
		throw new UnsupportedOperationException("This iterator's entries can only be read!");
	}

	public String getName() {
		return name;
	}

}
